package com.yuw.hwhigher04;

public class SalesEmployee extends ColaEmployee {
	// 属性
	// 总销售额
	private double saleCount;
	// 提成率
	private double saleRate;

	// 行为
	@Override
	public double getSalary(int month) {
		// 工资由月销售额和提成率决定。
		double mySalary = this.getSaleCount() * this.getSaleRate();
		// super.getSalary(month)表示的是生日金
		return mySalary + super.getSalary(month);
	}

	public double getSaleCount() {
		return saleCount;
	}

	public void setSaleCount(double saleCount) {
		this.saleCount = saleCount;
	}

	public double getSaleRate() {
		return saleRate;
	}

	public void setSaleRate(double saleRate) {
		this.saleRate = saleRate;
	}

	public SalesEmployee(String empName, int empMonth, double saleCount, double saleRate) {
		super(empName, empMonth);
		this.saleCount = saleCount;
		this.saleRate = saleRate;
	}

	public SalesEmployee() {
		super();
	}

}
